package com.example.mygrade.controller;

import com.example.mygrade.intercepter.GlobalConstant;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.GetMapping;

import javax.servlet.http.HttpServletRequest;

@Controller
public class ExitStudentLoginController {
    @GetMapping("/exitstudentlogin")
    public String exit(HttpServletRequest request){
        request.getSession().removeAttribute(GlobalConstant.USER_SESSION_KEY.getMsg());
        request.getSession().removeAttribute(GlobalConstant.USER_SESSION_ID.getMsg());
        return "redirect:/login/user";
    }
}
